<body>
<?php include 'header.phtml';?>

</div>
	<div class="AppContainer clearfix GridView"> 
		<div class="AppContent GridView">
			<div id="StickyDetailsAndRelationsBreadCrumbView" class="BreadCrumbView">
				<div class="breadcrumbs">
					<a href="/zurmo/app/index.php/accounts/default/index">Accounts</a> &#47; <span>gee</span>
				</div>
				<div id="stickyListLoadingArea">
					<span class="loading"></span>
				</div>
			</div>
			<div id="AccountDetailsAndRelationsView" class="ConfigurableDetailsAndRelationsView DetailsAndRelationsView ConfigurableMetadataView MetadataView">
				<div class="view-toolbar-container widgets-lock clearfix ">
					<nav class="pillbox clearfix">
					<div class="default-button">
						<a title="View as Kanban Board" href="/zurmo/app/index.php/accounts/default/details?id=3&amp;kanbanBoard=1">
							<i class="icon-kanban-board-view-type"><span>Kanban</span></i>
						</a>
					</div>
					<div class="default-button active">
						<a title="View as Details" href="/zurmo/app/index.php/accounts/default/details?id=3&amp;kanbanBoard=">
							<i class="icon-grid-view-type active"><span>Details</span></i>
						</a>
					</div>
					<nav class="default-button">
						<a title="Unlock to edit this screen&#039;s layout" href="/zurmo/app/index.php/accounts/default/details?id=3&amp;lockPortlets=">
							<i class="icon-lock"><!--Unlock--></i>
						</a>
					</nav>
					</nav>
				</div>
				<div class="ModelRelationsSecuredPortletFrameView SecuredPortletFrameView PortletFrameView MetadataView">
					<div class="juiportlet-columns"> 
						<ul class="juiportlet-columns-AccountDetailsAndRelationsView juiportlet-widget-column1 juiportlet-column juiportlet-column-split-left-75">
						<li class="juiportlet-widget AccountDetailsPortletView type-accounts" id="AccountDetailsAndRelationsView_1">
						<div class="juiportlet-widget-head">
							<h3>gee<a class="icon-star unstarred" id="star-Account-3" href="#">w</a></h3>
							<div class="view-toolbar-container toolbar-mbmenu clearfix">
								<div class="view-toolbar">
									<ul class="options-menu nav">
									<li class="parent last"><a href="javascript:void(0);"><span>Options</span></a>
										<ul>
										<li id="EditLinkActionElement">
											<a id="EditLinkActionElement-3-yt3" href="/zurmo/app/index.php/accounts/default/edit?id=3"><span>Edit</span></a>
										</li>
										<li id="AuditEventsModalListLinkActionElement">
											<a id="AuditEventsModalListLinkActionElement-3-yt4" href="#"><span>Audit Trail</span></a>
										</li>
										<li>
											<a id="CopyLinkActionElement-3-yt5" href="/zurmo/app/index.php/accounts/default/copy?id=3"><span>Clone</span></a>
										</li>
										<li class="last">
											<a id="AccountDeleteLinkActionElement-3-yt6" href="/zurmo/app/index.php/accounts/default/delete?id=3"><span>Delete</span></a>
										</li>
										</ul>
									</li>
									</ul>
								</div>
							</div>
						</div>
						<div class="juiportlet-widget-content"  >
						<div id="AccountDetailsPortletView" class="AccountEditAndDetailsView SecuredEditAndDetailsView EditAndDetailsView DetailsView ModelView ConfigurableMetadataView MetadataView">
							<div class="details-table"><div class="left-column full-width">
								<div class="panel">
								<table class="form-fields">
									<colgroup>
										<col class="col-0" /><col class="col-1" />
									</colgroup>
									<tbody>
										<tr>
											<th>Name</th>
											<td colspan="1">gee</td>
										</tr>
										<tr>
											<th>Office Phone</th>
											<td colspan="1">9874674</td>
										</tr>
										<tr>
											<th>Industry</th>
											<td colspan="1">Banking</td>
										</tr>
										<tr>
											<th>Office Fax</th>
											<td colspan="1">08546486</td>
										</tr>
										<tr>
											<th>Employees</th>
											<td colspan="1">90</td>
										</tr>
										<tr>
											<th>Annual Revenue</th>
											<td colspan="1">1,200,000</td>
										</tr>
										<tr>
											<th>Type</th>
											<td colspan="1">Vendor</td>
										</tr>
										<tr>
											<th>Website</th>
											<td colspan="1"><a target="blank" href="http://"></a></td>
										</tr>
										<tr>
											<th>Billing Address</th>
											<td colspan="1">
												<a id="Account_billingAddress_MapLink" class="icon-map" href="#">
													jgjgjgjgj<br/> 
													psopof<br/> 
													jfjfhhr kaltim,&#160;098759<br/>
													india
												</a>
											</td>
										</tr>
										<tr>
											<th>Shipping Address</th>
											<td colspan="1">
												<a id="Account_shippingAddress_MapLink" class="icon-map" href="#">
													hshshsh<br/>
													kalal oeieiw,&#160;463728<br/>
													jhdhfghfg
												</a>
											</td>
										</tr>
										<tr>
											<th>Description</th>
											<td colspan="1"></td>
										</tr>
									</tbody>
								</table>
								</div>
								<p class="after-form-details-content">
									Last Modified 11/23/13 9:45 PM&#160;by&#160;Super User&#160;|&#160;Created On 11/23/13 9:45 PM&#160;by&#160;Super User&#160;|&#160;Owner 
									<a href="/zurmo/app/index.php/users/default/details?id=1">Super User</a>&#160;|&#160;Who can read and write Everyone
								</p>
							</div>
							</div>
						</div>
					</div>
				</li>
				<li class="juiportlet-widget NoteInlineEditForPortletView type-notes" id="AccountDetailsAndRelationsView_2">
					<div class="juiportlet-widget-head">
						<h3>Notes</h3>
					</div>
					<div class="juiportlet-widget-content"  >
						<div id="NoteInlineEditForPortletView" class="InlineEditForPortletView ConfigurableMetadataView MetadataView">
							<div class="NoteInlineEditView InlineEditView EditView DetailsView ModelView ConfigurableMetadataView MetadataView">
								<div class="wide form">
									<form id="inline-edit-form" action="/zurmo/app/index.php/notes/default/inlineCreateSave?redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2FdefaultPortlet%2Fdetails%3Fid%3D3%26stickyOffset%3D1%26portletId%3D2%26uniqueLayoutId%3DAccountDetailsAndRelationsView_2" method="post">
										<div style="display:none">
											<input type="hidden" value="d95bda53da3650780c9ccf3a9c745c6f900701af" name="YII_CSRF_TOKEN" />
										</div>
										<div class="left-column full-width">
											<div class="panel">
												<table class="form-fields">
													<colgroup><col class="col-0" /></colgroup>
													<tbody>
														<tr>
															<td colspan="1">
																<textarea id="Note_description" name="Note[description]" rows="6" cols="50"></textarea>
																<div class="errorMessage" id="Note_description_em_" style="display:none"></div>
															</td>
														</tr>
														<tr>
															<td  colspan = "1">
																<a class="more-panels-link" id="show-more-panels-link-yt7" href="yt7">More Options</a>
																<a class="more-panels-link" id="show-less-panels-link-yt7" style="display:none;" href="yt7">Fewer Options</a>
															</td>
														</tr>
													</tbody>
												</table>
											</div>
											<div class="panel more-view-panel-yt7" style="display:none;">
												<table class="form-fields">
													<colgroup><col class="col-0" /></colgroup>
													<tbody>
														<tr>
															<td colspan="1">
																<div class="file-upload-box">
																	<div id="fileUploadNote">
																		<div class="fileupload-buttonbar clearfix">
																			<div class="addfileinput-button">
																				<span>Y</span>
																				<strong class="add-label">Add Files</strong>
																				<input id="Note_files" type="file" name="Note_files" />
																			</div>
																		</div>
																		<div class="fileupload-content">
																			<table class="files">
																				<tbody></tbody>
																			</table>
																		</div>
																	</div>
																	<script id="template-upload" type="text/x-jquery-tmpl">
																		<tr class="template-upload{{if error}} ui-state-error{{/if}}">
																		<td class="name">
																		<span class="z-spinner"></span>
																		${name} <span class="file-size">(${sizef})</span>
																		{{if error}}
																		<span class="upload-error">${error}</span>
																		{{else}}
																		<span class="upload-actions cancel">
																		<button class="cancel" title="Cancel"><span>Cancel</span></button>
																		</span>
																		{{/if}}
																		</td>
																		</tr>
																	</script>
																	<script id="template-download" type="text/x-jquery-tmpl">
																		<tr class="template-download{{if error}} ui-state-error{{/if}}">
																		{{if error}}
																		<td class="error" colspan="4">${error}</td>
																		{{else}}
																		<td class="name">
																		${name} <span class="file-size">(${size})</span>
																		<span class="upload-actions delete">
																		<button class="icon-delete" title="Remove" data-url="/zurmo/app/index.php/zurmo/fileModel/delete?id=${id}"><span><!--Delete--><span></button>
																		</span>
																		<input name="filesIds[]" type="hidden" value="${id}"/>
																		</td>
																		{{/if}}
																		</tr>
																	</script>
																</div>
															</td>
														</tr>
														<tr>
														<td colspan="1">
														<label for="Note_occurredOnDateTime">Occurred On</label><br/>
														<div class="has-date-select">
															<input id="Note_occurredOnDateTime" name="Note[occurredOnDateTime]" style="position:relative;z-index:10000;" type="text" value="11/24/2013 10:33 AM" />
														</div>
														<div class="errorMessage" id="Note_occurredOnDateTime_em_" style="display:none"></div>
														</td>
														</tr>
														<tr>
															<td>
															<label for="ActivityItemForm_Account_id">Account</label><br/>
															<input name="ActivityItemForm[Account][id]" id="ActivityItemForm_Account_id" value="3" type="hidden" />
															<div class="has-model-select">
																<input onblur="clearIdFromAutoCompleteField($(this).val(), &#039;ActivityItemForm_Account_id&#039;);" id="ActivityItemForm_Account_name" type="text" value="gee" name="ActivityItemForm_Account_name" />
																<a id="ActivityItemForm_Account_SelectLink" href="#">
																	<span class="model-select-icon"></span>
																	<span class="z-spinner"></span>
																</a>
															</div>
															<div class="errorMessage" id="ActivityItemForm_Account_em_" style="display:none"></div>
															</td>
														</tr>
														<tr>
															<td>
															<label for="ActivityItemForm_Contact_id">Contact or Lead</label><br/>
															<input name="ActivityItemForm[Contact][id]" id="ActivityItemForm_Contact_id" value="" type="hidden" /><div class="has-model-select"><input onblur="clearIdFromAutoCompleteField($(this).val(), &#039;ActivityItemForm_Contact_id&#039;);" id="ActivityItemForm_Contact_name" type="text" value="" name="ActivityItemForm_Contact_name" />
															<a id="ActivityItemForm_Contact_SelectLink" href="#">
																<span class="model-select-icon"></span>
																<span class="z-spinner"></span>
															</a>
															</div>
															<div class="errorMessage" id="ActivityItemForm_Contact_em_" style="display:none"></div>
															</td>
														</tr>
														<tr><td>
															<label for="ActivityItemForm_Opportunity_id">Opportunity</label><br/>
															<input name="ActivityItemForm[Opportunity][id]" id="ActivityItemForm_Opportunity_id" value="" type="hidden" />
																<div class="has-model-select">
																	<input onblur="clearIdFromAutoCompleteField($(this).val(), &#039;ActivityItemForm_Opportunity_id&#039;);" id="ActivityItemForm_Opportunity_name" type="text" value="" name="ActivityItemForm_Opportunity_name" />
																	<a id="ActivityItemForm_Opportunity_SelectLink" href="#"><span class="model-select-icon"></span><span class="z-spinner"></span></a>
																</div>
																<div class="errorMessage" id="ActivityItemForm_Opportunity_em_" style="display:none"></div>
														</td></tr>
														<tr><td colspan="1">
															<div class="permissions-box">
																<label>Who can read and write</label><br/>
																<div class="radio-input">
																	<input id="Note_explicitReadWriteModelPermissions_type_0" value="" type="radio" name="Note[explicitReadWriteModelPermissions][type]" />
																	<label for="Note_explicitReadWriteModelPermissions_type_0">Owner</label>
																</div>
																<div class="radio-input">
																	<input id="Note_explicitReadWriteModelPermissions_type_1" value="1" checked="checked" type="radio" name="Note[explicitReadWriteModelPermissions][type]" />
																	<label for="Note_explicitReadWriteModelPermissions_type_1">Everyone</label>
																</div>
															</div>
														</td></tr>
													</tbody>
												</table>
											</div>
										</div>
										<div class="view-toolbar-container clearfix">
											<div class="form-toolbar clearfix">
												<a id="save" name="save" class="attachLoading z-button" onclick="jQuery.yii.submitForm(this, &#039;&#039;, {}); return false;" href="#">
													<span class="z-spinner"></span>
													<span class="z-icon"></span>
													<span class="z-label">Save</span>
												</a>
												<div class="post-to-profile clearfix">
													<span>Post to Profile</span>
													<span id="post-to-profile-note-tooltip" class="tooltip" title="Post this note to your profile to share with your colleagues">?</span>
													<label class="hasCheckBox">
														<input type="checkbox" value="1" name="postToProfile" id="postToProfile" />
													</label>
												</div>
											</div>
										</div>
									</form>
									<div id="modalContainer-inline-edit-form"></div>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li class="juiportlet-widget AccountLatestActivitiesForPortletView type-activities" id="AccountDetailsAndRelationsView_3">
					<div class="juiportlet-widget-head">
					<h3>Latest Activities</h3>
					<div class="view-toolbar-container toolbar-mbmenu clearfix">
						<div class="view-toolbar"><ul class="options-menu nav">
						<li class="parent last"><a href="javascript:void(0);"><span>Create</span></a>
							<ul>
								<li class="last">
									<a id="CreateConversationFromRelatedListLinkActionElement--yt8" href="/zurmo/app/index.php/conversations/default/createFromRelation?relationAttributeName=notUsed&amp;relationModelClassName=Account&amp;relationModelId=3&amp;relationModuleId=accounts&amp;redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2Fdefault%2Fdetails%3Fid%3D3%26stickyOffset%3D1"><span>Conversation</span></a>
								</li>
							</ul>
						</li>
						</ul></div>
					</div>
					</div>
					<div class="juiportlet-widget-content"  >
<div id="AccountLatestActivitiesForPortletView" class="LatestActivitiesForPortletView ConfigurableMetadataView MetadataView"><div class="LatestActivitiesForAccountListView LatestActivitiesListView ListView ModelView ConfigurableMetadataView MetadataView"><form id="latest-activity-configuration-form" action="/zurmo/app/index.php/accounts/default/details?id=3&amp;stickyOffset=1" method="post">
<div style="display:none"><input type="hidden" value="d95bda53da3650780c9ccf3a9c745c6f900701af" name="YII_CSRF_TOKEN" /></div><div class="horizontal-line latest-activity-toolbar"><div id="LatestActivitiesConfigurationForm_ownedByFilter_area"><strong>View</strong>:<input id="ytLatestActivitiesConfigurationForm_ownedByFilter" type="hidden" value="" name="LatestActivitiesConfigurationForm[ownedByFilter]" /><input id="LatestActivitiesConfigurationForm_ownedByFilter_0" value="user" type="radio" name="LatestActivitiesConfigurationForm[ownedByFilter]" /><label for="LatestActivitiesConfigurationForm_ownedByFilter_0">Mine</label><input id="LatestActivitiesConfigurationForm_ownedByFilter_1" value="all" checked="checked" type="radio" name="LatestActivitiesConfigurationForm[ownedByFilter]" /><label for="LatestActivitiesConfigurationForm_ownedByFilter_1">Everyone</label>/div><div id="LatestActivitiesConfigurationForm_rollup_area">Roll Up:<span id="activities-rollup-tooltip" class="tooltip" title="Turn roll up on to see activities from related records.">?</span><input id="ytLatestActivitiesConfigurationForm_rollup" type="hidden" value="" name="LatestActivitiesConfigurationForm[rollup]" /><input id="LatestActivitiesConfigurationForm_rollup_0" value="" checked="checked" type="radio" name="LatestActivitiesConfigurationForm[rollup]" /><label for="LatestActivitiesConfigurationForm_rollup_0">Off</label><input id="LatestActivitiesConfigurationForm_rollup_1" value="1" type="radio" name="LatestActivitiesConfigurationForm[rollup]" /><label for="LatestActivitiesConfigurationForm_rollup_1">On</label></div><a id="filter-latest-activities-link" href="#">Filters</a></div>
<div id="filter-portlet-model-bar-AccountLatestActivitiesForPortletView" class="filter-portlet-model-bar" style="display:none"><div id="LatestActivitiesConfigurationForm_filteredByModelName_area"><input id="ytLatestActivitiesConfigurationForm_filteredByModelName" type="hidden" value="" name="LatestActivitiesConfigurationForm[filteredByModelName]" /><input id="LatestActivitiesConfigurationForm_filteredByModelName_0" value="all" checked="checked" type="radio" name="LatestActivitiesConfigurationForm[filteredByModelName]" /><label for="LatestActivitiesConfigurationForm_filteredByModelName_0">All Activities</label><input id="LatestActivitiesConfigurationForm_filteredByModelName_1" value="Conversation" type="radio" name="LatestActivitiesConfigurationForm[filteredByModelName]" /><label for="LatestActivitiesConfigurationForm_filteredByModelName_1">Conversations</label><input id="LatestActivitiesConfigurationForm_filteredByModelName_2" value="EmailMessage" type="radio" name="LatestActivitiesConfigurationForm[filteredByModelName]" /><label for="LatestActivitiesConfigurationForm_filteredByModelName_2">Emails</label><input id="LatestActivitiesConfigurationForm_filteredByModelName_3" value="Meeting" type="radio" name="LatestActivitiesConfigurationForm[filteredByModelName]" /><label for="LatestActivitiesConfigurationForm_filteredByModelName_3">Meetings</label><input id="LatestActivitiesConfigurationForm_filteredByModelName_4" value="Note" type="radio" name="LatestActivitiesConfigurationForm[filteredByModelName]" /><label for="LatestActivitiesConfigurationForm_filteredByModelName_4">Notes</label><input id="LatestActivitiesConfigurationForm_filteredByModelName_5" value="Task" type="radio" name="LatestActivitiesConfigurationForm[filteredByModelName]" /><label for="LatestActivitiesConfigurationForm_filteredByModelName_5">Tasks</label></div></div>
</form><div class="cgrid-view type-activities" id="list-viewAccountLatestActivitiesForPortletView">

<table class="items">
<tbody>
<tr><td colspan="1" class="empty"><span class="empty"><span class="icon-empty"></span>No results found</span></td></tr>
</tbody>
</table>
<div class="pager horizontal"><ul id="yw1" class="yiiPager"><li class="refresh hidden"><a href="/zurmo/app/index.php/accounts/defaultPortlet/details?id=3&amp;stickyOffset=1&amp;portletId=3">refresh</a></li></ul></div><div class="list-preloader"><span class="z-spinner"></span></div><div class="keys" style="display:none" title="/zurmo/app/index.php/accounts/default/details?id=3&amp;stickyOffset=1"></div>
</div>
</div></div>
</div>
</li>
</ul>
<ul class="juiportlet-columns-AccountDetailsAndRelationsView juiportlet-widget-column2 juiportlet-column juiportlet-column-split-right-25">
<li class="juiportlet-widget UpcomingMeetingsForAccountCalendarView type-meetings" id="AccountDetailsAndRelationsView_4">
<div class="juiportlet-widget-head">
<h3>Upcoming Meetings</h3><div class="view-toolbar-container clearfix"><div class="portlet-toolbar"><a id="CreateFromRelatedListLinkActionElement--yt9" href="/zurmo/app/index.php/meetings/default/createFromRelation?relationAttributeName=Account&amp;relationModelId=3&amp;relationModuleId=accounts&amp;redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2Fdefault%2Fdetails%3Fid%3D3%26stickyOffset%3D1"><span class="z-label">Create</span></a></div></div>
</div>
<div class="juiportlet-widget-content"  >
<div id="UpcomingMeetingsForAccountCalendarView" class="UpcomingMeetingsRelatedCalendarView UpcomingMeetingsCalendarView CalendarView ModelView ConfigurableMetadataView MetadataView"><div id="calendarAccountDetailsAndRelationsView_4_container"></div><input id="calendarSelectedDateAccountDetailsAndRelationsView_4" style="display:none;" type="text" name="calendarSelectedDateAccountDetailsAndRelationsView_4" /></div>
</div>
</li>
<li class="juiportlet-widget OpenTasksForAccountRelatedListView type-tasks" id="AccountDetailsAndRelationsView_5">
<div class="juiportlet-widget-head">
<h3>Open Tasks</h3><div class="view-toolbar-container clearfix"><div class="portlet-toolbar"><a id="CreateFromRelatedModalLinkActionElement--yt10" href="#"><span class="z-label">Create</span></a></div></div>
</div>
<div class="juiportlet-widget-content"  >
<div class="OpenTasksForAccountRelatedListView OpenTasksRelatedListView SecuredRelatedListView RelatedListView ListView ModelView ConfigurableMetadataView MetadataView"><div class="cgrid-view type-tasks" id="list-viewAccountDetailsAndRelationsView_5">

<span class="empty"><span class="icon-empty"></span>No tasks found</span>
<div class="pager horizontal"><ul id="yw2" class="yiiPager"><li class="refresh hidden"><a href="/zurmo/app/index.php/accounts/defaultPortlet/details?id=3&amp;stickyOffset=1&amp;portletId=5&amp;redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2Fdefault%2Fdetails%3Fid%3D3%26stickyOffset%3D1">refresh</a></li></ul></div><div class="list-preloader"><span class="z-spinner"></span></div><div class="keys" style="display:none" title="/zurmo/app/index.php/accounts/default/details?id=3&amp;stickyOffset=1"></div>
</div>
</div>
</div>
</li>
<li class="juiportlet-widget ContactsForAccountRelatedListView type-contacts" id="AccountDetailsAndRelationsView_6">
<div class="juiportlet-widget-head">
<h3>Contacts</h3><div class="view-toolbar-container clearfix"><div class="portlet-toolbar"><a id="CreateFromRelatedListLinkActionElement--yt11" href="/zurmo/app/index.php/contacts/default/createFromRelation?relationAttributeName=account&amp;relationModelId=3&amp;relationModuleId=accounts&amp;redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2Fdefault%2Fdetails%3Fid%3D3%26stickyOffset%3D1"><span class="z-label">Create</span></a></div></div>
</div>
<div class="juiportlet-widget-content"  >
<div class="ContactsForAccountRelatedListView ContactsRelatedListView SecuredRelatedListView RelatedListView ListView ModelView ConfigurableMetadataView MetadataView"><div class="cgrid-view type-contacts" id="list-viewAccountDetailsAndRelationsView_6">

<span class="empty"><span class="icon-empty"></span>No contacts found</span>
<div class="pager horizontal"><ul id="yw3" class="yiiPager"><li class="refresh hidden"><a href="/zurmo/app/index.php/accounts/defaultPortlet/details?id=3&amp;stickyOffset=1&amp;portletId=6&amp;redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2Fdefault%2Fdetails%3Fid%3D3%26stickyOffset%3D1">refresh</a></li></ul></div><div class="list-preloader"><span class="z-spinner"></span></div><div class="keys" style="display:none" title="/zurmo/app/index.php/accounts/default/details?id=3&amp;stickyOffset=1"></div>
</div>
</div>
</div>
</li>
<li class="juiportlet-widget OpportunitiesForAccountRelatedListView type-opportunities" id="AccountDetailsAndRelationsView_7">
<div class="juiportlet-widget-head">
<h3>Opportunities</h3><div class="view-toolbar-container clearfix"><div class="portlet-toolbar"><a id="CreateFromRelatedListLinkActionElement--yt12" href="/zurmo/app/index.php/opportunities/default/createFromRelation?relationAttributeName=account&amp;relationModelId=3&amp;relationModuleId=accounts&amp;redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2Fdefault%2Fdetails%3Fid%3D3%26stickyOffset%3D1"><span class="z-label">Create</span></a></div></div>
</div>
<div class="juiportlet-widget-content"  >
<div class="OpportunitiesForAccountRelatedListView OpportunitiesRelatedListView SecuredRelatedListView RelatedListView ListView ModelView ConfigurableMetadataView MetadataView"><div class="cgrid-view type-opportunities" id="list-viewAccountDetailsAndRelationsView_7">

<span class="empty"><span class="icon-empty"></span>No opportunities found</span>
<div class="pager horizontal"><ul id="yw4" class="yiiPager"><li class="refresh hidden"><a href="/zurmo/app/index.php/accounts/defaultPortlet/details?id=3&amp;stickyOffset=1&amp;portletId=7&amp;redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2Fdefault%2Fdetails%3Fid%3D3%26stickyOffset%3D1">refresh</a></li></ul></div><div class="list-preloader"><span class="z-spinner"></span></div><div class="keys" style="display:none" title="/zurmo/app/index.php/accounts/default/details?id=3&amp;stickyOffset=1"></div>
</div>
</div>
</div>
</li>
</ul>
</div></div></div></div><div id="FlashMessageView"><div id = "FlashMessageBar"></div></div></div><div id="ModalContainerView"><div id="modalContainer"></div></div><div id="ModalGameNotificationContainerView"></div><div id="GameCoinContainerView"></div><div id="FooterView"><a href="http://www.zurmo.com" id="credit-link" class="clearfix"><span>Copyright &#169; Zurmo Inc., 2013. All rights reserved.</span></a><div class="ui-chooser"><a class="icon-mobile" href="/zurmo/app/index.php/zurmo/default/userInterface?userInterface=Mobile"><span>Show Mobile</span></a><a class="icon-desktop active" href="/zurmo/app/index.php/zurmo/default/userInterface?userInterface=Desktop"><span>Show Full</span></a></div></div></div></div></div><script type="text/javascript">
/*<![CDATA[*/
function closeGamificationDashboard(){
                           $('#UserGameDashboardView').remove();
                           $('body').removeClass('gd-dashboard-active');
                           $('#header-game-dashboard-link').html('∂').toggleClass('highlighted');
                       }
                       
            jQuery.datepicker._gotoToday = function (id) {            
                var inst = this._getInst($(id)[0]);
                dp = inst.dpDiv;                                
                var now = new Date();
                jQuery.datepicker._base_gotoToday(id);
                now.setMinutes(now.getMinutes()+(420)+now.getTimezoneOffset());
                this._setTime(inst, now);     
                $('.ui-datepicker-today', dp).click();
            };            
        

                function clearIdFromAutoCompleteField(value, id)
                {
                    if (value == '')
                    {
                        $('#' + id).val('');
                    }
                }
            

                function closeOpenTaskByCheckBoxClick(checkboxId, modelId)
                {
                    if ($('#' + checkboxId).attr('checked') == 'checked')
                    {
                        $('#' + checkboxId).attr('disabled', true);
                        $('#' + checkboxId).parent().addClass('c_on');
                        $('#' + checkboxId).parent().addClass('disabled');
                        $('#' + checkboxId).parentsUntil('tr').parent().children().css('text-decoration', 'line-through');
                        $.ajax({
                            url : '/zurmo/app/index.php/tasks/default/closeTask?id=' + modelId,
                            type : 'GET',
                            dataType : 'json',
                            success : function(data)
                            {
                                //find if there is a latest activities portlet
                                $('.LatestActivitiesForPortletView').each(function(){
                                    $(this).find('.pager').find('.refresh').find('a').click();
                                });
                            },
                            error : function()
                            {
                                //todo: error call
                            }
                        });
                    }
                }
            
jQuery(function($) {

                    jQuery("body").ajaxComplete(
                        function(event, request, options)
                        {
                            if (request.responseText == "sessionTimeout")
                            {
                                $.cookie("sessionTimeoutCookie", 1,
                                        {
                                            expires : 1,
                                            path:  "/"
                                        });
                                window.location.reload(true);
                            }
                        }
                    );
                
$('#go-to-dashboard-link, #close-game-notification-link').click(function(event){
                           event.preventDefault();
                           $('#game-notification').fadeOut(300, function(){
                               $('#game-notification').remove();
                           });
                       });
                       $('.gd-dashboard-active').on('click', function(){
                           if($('#UserGameDashboardView').length){
                               closeGamificationDashboard();
                           }
                           return false;
                       });
$('body').on('click', '#header-game-dashboard-link', function(){jQuery.ajax({'beforeSend':function(){
                    if($("#UserGameDashboardView").length){
                        closeGamificationDashboard();
                        return false;
                    }
                    $("body").addClass("gd-dashboard-active");
                    $("#header-game-dashboard-link").html("‰").toggleClass("highlighted");
                },'success':function(data){$("#FooterView").after(data);},'url':'/zurmo/app/index.php/users/default/gameDashboard?id=1','cache':false});return false;});
  $(".nav li").hover(
    function () {
      if ($(this).hasClass("parent")) {
        $(this).addClass("over");
      }
    },
    function () {
      $(this).removeClass("over");
    }
  );

$("#globalSearchScope").bind("multiselectclick", function(event, ui){
                            if ($("#globalSearchScope").multiselect("widget").find(":checkbox:checked").length == 0)
                            {
                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value == "All" && !this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                            if (ui.value == "All" && ui.checked)
                            {
                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value != "All" && this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                            else if (ui.value != "All" && ui.checked)
                            {
                                $("#globalSearchScope").multiselect("widget").find(":checkbox").each(function(){
                                    if (this.value == "All" && this.checked)
                                    {
                                        this.click();
                                    }
                                });
                            }
                        });
                       
$('#globalSearchScope').multiselect({'selectedText':'','noneSelectedText':'','header':false,'position':{'my':'right top','at':'right bottom'}}); $(this).setupCheckboxStyling($('#globalSearchScope').parent())
$("#globalSearchInput").bind("focus", function(event, ui){
                            $("#globalSearchInput").autocomplete("option", "source", "/zurmo/app/index.php/zurmo/default/globalSearchAutoComplete?" + $.param($("#globalSearchScope").serializeArray()));
                        });
                       
jQuery('#globalSearchInput').autocomplete({'select': function(event, ui) {if (ui.item.href.length > 0){window.location = ui.item.href;} return false;},'search': function(event, ui) { $(this).makeOrRemoveTogglableSpinner(true, "#app-search") },'open': function(event, ui) { $(this).makeOrRemoveTogglableSpinner(false, "#app-search") },'position':{'my':'right top','at':'right bottom'},'source':'/zurmo/app/index.php/zurmo/default/globalSearchAutoComplete'});
 $("#globalSearchInput").data( "autocomplete" )._renderItem = function( ul, item ) {
                            return $( "<li></li>" ).data( "item.autocomplete", item )
                                    .append( "<a><span class=" + item.iconClass + "></span><span>" + item.label + "</span></a>" )
                                    .appendTo( ul );
                        };
$('body').on('click', '#yt0', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                window.scrollTo(0, 0);
                jQuery('#modalContainer').dialog({
                    'title' : 'Create Task',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : 'task-dialog',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer').parent().removeClass('openingModal');
                                                     $('#modalContainer').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/zurmo/app/index.php/tasks/default/modalCreate?modalId=modalContainer','cache':false,'success':function(html){jQuery("#modalContainer").html(html)}});return false;});
$(document).ready(function () { jQuery.ajax({'type':'GET','url':'/zurmo/app/index.php/accounts/default/renderStickyListBreadCrumbContent?stickyKey=AccountsSearchView&stickyOffset=1&stickyModelId=3','cache':false,'data':jQuery(this).parents("form").serialize(),'success':function(html){jQuery("#stickyListLoadingArea").html(html)}});});
$('body').off('click.update', '#star-Account-3'); $('body').on('click.update', '#star-Account-3', function(){jQuery.ajax({'success':function(data){$('#star-Account-3').removeClass().addClass(data)},'url':'/zurmo/app/index.php/zurmo/default/toggleStar?modelClassName=Account&modelId=3','cache':false});return false;});
$('body').on('click', '#Account_billingAddress_MapLink', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                window.scrollTo(0, 0);
                jQuery('#modalContainer').dialog({
                    'title' : 'gee',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : '',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer').parent().removeClass('openingModal');
                                                     $('#modalContainer').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/zurmo/app/index.php/maps/default/mapAndPoint?addressString=jgjgjgjgj%2C+psopof%2C+jfjfhhr%2C+kaltim%2C+098759%2C+india&latitude=&longitude=','cache':false,'success':function(html){jQuery("#modalContainer").html(html)}});return false;});
$('body').on('click', '#Account_shippingAddress_MapLink', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                window.scrollTo(0, 0);
                jQuery('#modalContainer').dialog({
                    'title' : 'gee',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : '',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer').parent().removeClass('openingModal');
                                                     $('#modalContainer').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/zurmo/app/index.php/maps/default/mapAndPoint?addressString=hshshsh%2C+kalal%2C+oeieiw%2C+463728%2C+jhdhfghfg&latitude=&longitude=','cache':false,'success':function(html){jQuery("#modalContainer").html(html)}});return false;});
$('body').on('click', '#AuditEventsModalListLinkActionElement-3-yt4', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#AuditEventsModalContainer').html('');
                $(this).makeLargeLoadingSpinner(true, '#AuditEventsModalContainer');
                window.scrollTo(0, 0);
                jQuery('#AuditEventsModalContainer').dialog({
                    'title' : 'Audit Trail',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : '',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#AuditEventsModalContainer').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#AuditEventsModalContainer').parent().removeClass('openingModal');
                                                     $('#AuditEventsModalContainer').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/zurmo/app/index.php/accounts/default/auditEventsModalList?id=3','cache':false,'success':function(html){jQuery("#AuditEventsModalContainer").html(html)}});return false;});
jQuery('body').on('click','#AccountDeleteLinkActionElement-3-yt6',function(){return confirm('Are you sure you want to delete this account?');});
$(function () {
    'use strict';

    // Initialize the jQuery File Upload widget:
    $('#fileUploadNote').fileupload({
        dataType: 'json',
        url: '/zurmo/app/index.php/zurmo/fileModel/upload?filesVariableName=Note_files',
        autoUpload: true,
        sequentialUploads: true,
        maxFileSize: 1048576,
        add: function (e, data) {
            
            
            var that = $(this).data('fileupload');
            that._adjustMaxNumberOfFiles(-data.files.length);
            data.isAdjusted = true;
            data.isValidated = that._validate(data.files);
            data.context = that._renderUpload(data.files)
                .appendTo($(this).find('.files')).fadeIn(function () {
                    // Fix for IE7 and lower:
                    $(this).show();
                    $(this).makeOrRemoveTogglableSpinner(true, '#'+'fileUploadNote');
                }).data('data', data);
            if ((that.options.autoUpload || data.autoUpload) &&
                    data.isValidated) {
                data.jqXHR = data.submit();
            }
        }
    });
    // Open download dialogs via iframes,
    // to prevent aborting current uploads:
    $('#fileUploadNote .files a:not([target^=_blank])').live('click', function (e) {
        e.preventDefault();
        $('<iframe style="display:none;"></iframe>')
            .prop('src', this.href)
            .appendTo('body');
    });
    $('.fileupload-buttonbar').removeClass('ui-widget-header ui-corner-top');
    $('.fileupload-content').removeClass('ui-widget-content ui-corner-bottom');
    $('#fileUploadNote').bind('fileuploaddestroy', function (e, data) {
            

    });
    $('#fileUploadNote').bind('fileuploadalways', function (e, data) {
        if (data == undefined || data.result == undefined ||
          ((data.result[0] != undefined && data.result[0].error != undefined) || data.result.error != undefined))
        {
            setTimeout(function () {
               $('#inline-edit-form').find('.files > tbody').children(':last').fadeOut('slow', function() { $(this).remove();});
               
            }, 1000);
        }
    });
    //load existing files
    var existingFiles = [];
    var fu = $('#fileUploadNote').data('fileupload');
    fu._adjustMaxNumberOfFiles(-existingFiles.length);
    fu._renderDownload(existingFiles)
        .appendTo($('#fileUploadNote .files'))
        .fadeIn(function () {
            // Fix for IE7 and lower:
            $(this).show();
    });
});

jQuery('#Note_occurredOnDateTime').datetimepicker({'stepMinute':5,'timeText':'Time','hourText':'Hour','minuteText':'Minute','secondText':'Second','showOn':'both','buttonText':'<span><!--Date--><\/span>','buttonImageOnly':false,'timeFormat':'h:mm tt','dateFormat':'m/d/yy','currentText':'<span class=\"z-label\">Now<\/span>','closeText':'<span class=\"z-label\">Done<\/span>'});
jQuery('#ActivityItemForm_Account_name').autocomplete({'select':function(event, ui){ jQuery("#ActivityItemForm_Account_id").val(ui.item["id"]).trigger("change");},'appendTo':$("#ActivityItemForm_Account_name").parent().parent(),'search': function(event, ui)
                                  {
                                       var context = $("#ActivityItemForm_Account_name").parent();
                                       $(".model-select-icon", context).fadeOut(100);
                                       $(this).makeOrRemoveTogglableSpinner(true, context);
                                  },'open': function(event, ui)
                                  {
                                       var context = $("#ActivityItemForm_Account_name").parent();
                                       $(".model-select-icon", context).fadeIn(250);
                                       $(this).makeOrRemoveTogglableSpinner(false, context);
                                  },'close': function(event, ui)
                                  {
                                       var context = $("#ActivityItemForm_Account_name").parent();
                                       $(".model-select-icon", context).fadeIn(250);
                                       $(this).makeOrRemoveTogglableSpinner(false, context);
                                  },'response': function(event, ui)
                                  {
                                       if (ui.content.length < 1)
                                       {
                                           var context = $("#ActivityItemForm_Account_name").parent();
                                           $(".model-select-icon", context).fadeIn(250);
                                           $(this).makeOrRemoveTogglableSpinner(false, context);
                                       }
                                  },'source':'/zurmo/app/index.php/accounts/default/autoComplete'});
$('body').off('click.selectLink', '#ActivityItemForm_Account_SelectLink'); $('body').on('click.selectLink', '#ActivityItemForm_Account_SelectLink', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer-inline-edit-form').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer-inline-edit-form');
                window.scrollTo(0, 0);
                jQuery('#modalContainer-inline-edit-form').dialog({
                    'title' : 'Account Search',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : '',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer-inline-edit-form').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer-inline-edit-form').parent().removeClass('openingModal');
                                                     $('#modalContainer-inline-edit-form').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/zurmo/app/index.php/accounts/default/modalList?modalTransferInformation%5BsourceIdFieldId%5D=ActivityItemForm_Account_id&modalTransferInformation%5BsourceNameFieldId%5D=ActivityItemForm_Account_name&modalTransferInformation%5BmodalId%5D=modalContainer-inline-edit-form&modalTransferInformation%5BsourceModelId%5D=','cache':false,'success':function(html){jQuery("#modalContainer-inline-edit-form").html(html)}});return false;});
jQuery('#ActivityItemForm_Contact_name').autocomplete({'select':function(event, ui){ jQuery("#ActivityItemForm_Contact_id").val(ui.item["id"]).trigger("change");},'appendTo':$("#ActivityItemForm_Contact_name").parent().parent(),'search': function(event, ui)
                                  {
                                       var context = $("#ActivityItemForm_Contact_name").parent();
                                       $(".model-select-icon", context).fadeOut(100);
                                       $(this).makeOrRemoveTogglableSpinner(true, context);
                                  },'open': function(event, ui)
                                  {
                                       var context = $("#ActivityItemForm_Contact_name").parent();
                                       $(".model-select-icon", context).fadeIn(250);
                                       $(this).makeOrRemoveTogglableSpinner(false, context);
                                  },'close': function(event, ui)
                                  {
                                       var context = $("#ActivityItemForm_Contact_name").parent();
                                       $(".model-select-icon", context).fadeIn(250);
                                       $(this).makeOrRemoveTogglableSpinner(false, context);
                                  },'response': function(event, ui)
                                  {
                                       if (ui.content.length < 1)
                                       {
                                           var context = $("#ActivityItemForm_Contact_name").parent();
                                           $(".model-select-icon", context).fadeIn(250);
                                           $(this).makeOrRemoveTogglableSpinner(false, context);
                                       }
                                  },'source':'/zurmo/app/index.php/contacts/variableContactState/autoCompleteAllContacts'});
$('body').off('click.selectLink', '#ActivityItemForm_Contact_SelectLink'); $('body').on('click.selectLink', '#ActivityItemForm_Contact_SelectLink', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer-inline-edit-form').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer-inline-edit-form');
                window.scrollTo(0, 0);
                jQuery('#modalContainer-inline-edit-form').dialog({
                    'title' : 'Contact Search',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : '',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer-inline-edit-form').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer-inline-edit-form').parent().removeClass('openingModal');
                                                     $('#modalContainer-inline-edit-form').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/zurmo/app/index.php/contacts/variableContactState/modalListAllContacts?modalTransferInformation%5BsourceIdFieldId%5D=ActivityItemForm_Contact_id&modalTransferInformation%5BsourceNameFieldId%5D=ActivityItemForm_Contact_name&modalTransferInformation%5BmodalId%5D=modalContainer-inline-edit-form&modalTransferInformation%5BsourceModelId%5D=','cache':false,'success':function(html){jQuery("#modalContainer-inline-edit-form").html(html)}});return false;});
jQuery('#ActivityItemForm_Opportunity_name').autocomplete({'select':function(event, ui){ jQuery("#ActivityItemForm_Opportunity_id").val(ui.item["id"]).trigger("change");},'appendTo':$("#ActivityItemForm_Opportunity_name").parent().parent(),'search': function(event, ui)
                                  {
                                       var context = $("#ActivityItemForm_Opportunity_name").parent();
                                       $(".model-select-icon", context).fadeOut(100);
                                       $(this).makeOrRemoveTogglableSpinner(true, context);
                                  },'open': function(event, ui)
                                  {
                                       var context = $("#ActivityItemForm_Opportunity_name").parent();
                                       $(".model-select-icon", context).fadeIn(250);
                                       $(this).makeOrRemoveTogglableSpinner(false, context);
                                  },'close': function(event, ui)
                                  {
                                       var context = $("#ActivityItemForm_Opportunity_name").parent();
                                       $(".model-select-icon", context).fadeIn(250);
                                       $(this).makeOrRemoveTogglableSpinner(false, context);
                                  },'response': function(event, ui)
                                  {
                                       if (ui.content.length < 1)
                                       {
                                           var context = $("#ActivityItemForm_Opportunity_name").parent();
                                           $(".model-select-icon", context).fadeIn(250);
                                           $(this).makeOrRemoveTogglableSpinner(false, context);
                                       }
                                  },'source':'/zurmo/app/index.php/opportunities/default/autoComplete'});
$('body').off('click.selectLink', '#ActivityItemForm_Opportunity_SelectLink'); $('body').on('click.selectLink', '#ActivityItemForm_Opportunity_SelectLink', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer-inline-edit-form').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer-inline-edit-form');
                window.scrollTo(0, 0);
                jQuery('#modalContainer-inline-edit-form').dialog({
                    'title' : 'Opportunity Search',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : '',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer-inline-edit-form').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer-inline-edit-form').parent().removeClass('openingModal');
                                                     $('#modalContainer-inline-edit-form').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/zurmo/app/index.php/opportunities/default/modalList?modalTransferInformation%5BsourceIdFieldId%5D=ActivityItemForm_Opportunity_id&modalTransferInformation%5BsourceNameFieldId%5D=ActivityItemForm_Opportunity_name&modalTransferInformation%5BmodalId%5D=modalContainer-inline-edit-form&modalTransferInformation%5BsourceModelId%5D=','cache':false,'success':function(html){jQuery("#modalContainer-inline-edit-form").html(html)}});return false;});

                    $('#show-more-panels-link-yt7').click( function()
                        {
                            $('.more-view-panel-' + $(this).attr('href')).show();
                            $('#show-more-panels-link-yt7').hide();
                            $('#show-less-panels-link-yt7').show();
                            return false;
                        }
                    );
                    $('#show-less-panels-link-yt7').click( function()
                        {
                            $('.more-view-panel-' + $(this).attr('href')).hide();
                            $('#show-more-panels-link-yt7').show();
                            $('#show-less-panels-link-yt7').hide();
                            return false;
                        }
                    );
$("#post-to-profile-note-tooltip").qtip([]);
$('#inline-edit-form').yiiactiveform({'validateOnSubmit':true,'validateOnChange':false,'beforeValidate':$(this).beforeValidateAction,'afterValidate':$(this).afterValidateAjaxAction,'afterValidateAjax':'jQuery.ajax({\'type\':\'POST\',\'data\':$(\"#inline-edit-form\").serialize(),\'url\':\'/zurmo/app/index.php/notes/default/inlineCreateSave?redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2FdefaultPortlet%2Fdetails%3Fid%3D3%26stickyOffset%3D1%26portletId%3D2%26uniqueLayoutId%3DAccountDetailsAndRelationsView_2\',\'complete\':function(XMLHttpRequest, textStatus){\n                        //find if there is a latest activities portlet\n                        $(\'.LatestActivitiesForPortletView\').each(function(){\n                            $(this).find(\'.pager\').find(\'.refresh\').find(\'a\').click();\n                        });},\'cache\':false,\'success\':function(html){jQuery(\"#NoteInlineEditForPortletView\").html(html)}});','attributes':[{'id':'Note_description','inputID':'Note_description','errorID':'Note_description_em_','model':'Note','name':'description','enableAjaxValidation':true},{'id':'Note_occurredOnDateTime','inputID':'Note_occurredOnDateTime','errorID':'Note_occurredOnDateTime_em_','model':'Note','name':'occurredOnDateTime','enableAjaxValidation':true},{'id':'ActivityItemForm_Account','inputID':'ActivityItemForm_Account','errorID':'ActivityItemForm_Account_em_','model':'ActivityItemForm','name':'Account','enableAjaxValidation':true},{'id':'ActivityItemForm_Contact','inputID':'ActivityItemForm_Contact','errorID':'ActivityItemForm_Contact_em_','model':'ActivityItemForm','name':'Contact','enableAjaxValidation':true},{'id':'ActivityItemForm_Opportunity','inputID':'ActivityItemForm_Opportunity','errorID':'ActivityItemForm_Opportunity_em_','model':'ActivityItemForm','name':'Opportunity','enableAjaxValidation':true}],'summaryID':'inline-edit-form_es_'});
$("#activities-rollup-tooltip").qtip([]);

            $('#LatestActivitiesConfigurationForm_rollup_area').buttonset();
            $('#LatestActivitiesConfigurationForm_ownedByFilter_area').buttonset();
            $('#LatestActivitiesConfigurationForm_filteredByModelName_area').buttonset();
            $('#LatestActivitiesConfigurationForm_rollup_area').change(function()
                {
                    jQuery.ajax({'type':'GET','data':$("#latest-activity-configuration-form").serialize(),'url':$.param.querystring("/zurmo/app/index.php/accounts/defaultPortlet/details?id=3&stickyOffset=1&portletId=3&uniqueLayoutId=AccountDetailsAndRelationsView_3", "AccountLatestActivitiesForPortletView_page=1"),'beforeSend':function(){$(this).makeSmallLoadingSpinner(true, "#list-viewAccountLatestActivitiesForPortletView"); $("#latest-activity-configuration-form").parent().children(".cgrid-view").addClass("loading");},'complete':function()
                    {
                                        $("#latest-activity-configuration-form").parent().children(".cgrid-view").removeClass("loading");
                                        $("#filter-portlet-model-bar-AccountLatestActivitiesForPortletView").show();
                    },'cache':false,'success':function(html){jQuery("#AccountLatestActivitiesForPortletView").html(html)}});
                }
            );
            $('#LatestActivitiesConfigurationForm_ownedByFilter_area').change(function()
                {
                    jQuery.ajax({'type':'GET','data':$("#latest-activity-configuration-form").serialize(),'url':$.param.querystring("/zurmo/app/index.php/accounts/defaultPortlet/details?id=3&stickyOffset=1&portletId=3&uniqueLayoutId=AccountDetailsAndRelationsView_3", "AccountLatestActivitiesForPortletView_page=1"),'beforeSend':function(){$(this).makeSmallLoadingSpinner(true, "#list-viewAccountLatestActivitiesForPortletView"); $("#latest-activity-configuration-form").parent().children(".cgrid-view").addClass("loading");},'complete':function()
                    {
                                        $("#latest-activity-configuration-form").parent().children(".cgrid-view").removeClass("loading");
                                        $("#filter-portlet-model-bar-AccountLatestActivitiesForPortletView").show();
                    },'cache':false,'success':function(html){jQuery("#AccountLatestActivitiesForPortletView").html(html)}});
                }
            );
            $('#LatestActivitiesConfigurationForm_filteredByModelName_area').change(function()
                {
                    jQuery.ajax({'type':'GET','data':$("#latest-activity-configuration-form").serialize(),'url':$.param.querystring("/zurmo/app/index.php/accounts/defaultPortlet/details?id=3&stickyOffset=1&portletId=3&uniqueLayoutId=AccountDetailsAndRelationsView_3", "AccountLatestActivitiesForPortletView_page=1"),'beforeSend':function(){$(this).makeSmallLoadingSpinner(true, "#list-viewAccountLatestActivitiesForPortletView"); $("#latest-activity-configuration-form").parent().children(".cgrid-view").addClass("loading");},'complete':function()
                    {
                                        $("#latest-activity-configuration-form").parent().children(".cgrid-view").removeClass("loading");
                                        $("#filter-portlet-model-bar-AccountLatestActivitiesForPortletView").show();
                    },'cache':false,'success':function(html){jQuery("#AccountLatestActivitiesForPortletView").html(html)}});
                }
            );
            $('#filter-latest-activities-link').click( function()
                {
                    $('#filter-portlet-model-bar-AccountLatestActivitiesForPortletView').toggle();
                    return false;
                }
            );
            
$(document).on('click', '#list-viewAccountLatestActivitiesForPortletView .task-kanban-detail-link', function()
                          {
                            var id = $(this).attr('id');
                            var idParts = id.split('-');
                            var taskId = parseInt(idParts[1]);
                            $.ajax(
                            {
                                'type' : 'GET',
                                'url'  : '/zurmo/app/index.php/tasks/default/modalDetails' + '?id=' + taskId,
                                'beforeSend' : function(){
                jQuery('#modalContainer').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                window.scrollTo(0, 0);
                jQuery('#modalContainer').dialog({
                    'title' : 'Collaborate On This Task',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : 'task-dialog',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer').parent().removeClass('openingModal');
                                                     $('#modalContainer').dialog('destroy');
                                                     $.fn.yiiGridView.update('list-viewAccountLatestActivitiesForPortletView');
                                                     }
                });
                return true;
            },
                                'update'     : '#modalContainer',
                                'success': function(html){jQuery('#modalContainer').html(html)}
                            });
                          }
                        );
jQuery('#list-viewAccountLatestActivitiesForPortletView').yiiGridView({'ajaxUpdate':['list-viewAccountLatestActivitiesForPortletView'],'ajaxVar':'ajax','pagerClass':'pager horizontal','loadingClass':'loading','filterClass':'filters','tableClass':'items','selectableRows':0,'enableHistory':false,'updateSelector':'{page}, {sort}','filterSelector':'{filter}','pageVar':'AccountLatestActivitiesForPortletView_page','beforeAjaxUpdate':function(id, options) { $(this).makeSmallLoadingSpinner(true, "#" + id); },'afterAjaxUpdate':function(id, data) {
                        processAjaxSuccessError(id, data);
                    }});
var calendarEvents = {}; 

jQuery('#calendarAccountDetailsAndRelationsView_4_container').datepicker({'dateFormat':'m/d/y','onChangeMonthYear':function(year, month, inst) {
                //Call to render new events
                $.ajax({
                    url      : $.param.querystring('/zurmo/app/index.php/accounts/defaultPortlet/viewAction?id=3&stickyOffset=1&action=renderMonthEvents&portletId=4&uniqueLayoutId=AccountDetailsAndRelationsView_4', '&month=' + month + '&year=' + year),
                    async    : false,
                    type     : 'GET',
                    dataType : 'html',
                    success  : function(data)
                    {
                        eval(data);
                        //Since the home page for some reason cannot render this properly in beforeShow, we are using a trick.
                        setTimeout('addSpansToDatesOnCalendar("' + inst.id + '")', 100);
                    },
                    error : function()
                    {
                        //todo: error call
                    }
                });
            },'onSelect':function(dateText, inst) {
                $.ajax({
                    url      : $.param.querystring('/zurmo/app/index.php/meetings/default/daysMeetingsFromCalendarModalList?id=3&stickyOffset=1&redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2Fdefault%2Fdetails%3Fid%3D3%26stickyOffset%3D1&relationModelId=3&relationModelClassName=Account', '&stringTime=' + $('#calendarSelectedDateAccountDetailsAndRelationsView_4').val()),
                    async    : false,
                    type     : 'GET',
                    'beforeSend' : function(){
                                        jQuery('#modalContainer').html('');
                                        $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                                        jQuery('#modalContainer').dialog({'title': dateText,
                                                                          'autoOpen':true,
                                                                          'modal': true,
                                                                          'height': 'auto',
                                                                          'position': 'center',
                                                                          'width':600}); return true;},
                    success  : function(data)
                    {
                        jQuery('#modalContainer').html(data)
                        //Since the home page for some reason cannot render this properly in beforeShow, we are using a trick.
                        setTimeout('addSpansToDatesOnCalendar("' + inst.id + '")', 100);
                    },
                    error : function()
                    {
                        //todo: error call
                    }
                });
            },'altFormat':'yy-mm-dd','altField':'#calendarSelectedDateAccountDetailsAndRelationsView_4','beforeShowDay':function(date) {
                var event = calendarEvents[date];
                if (event) {
                    return [true, event.className, event.text];
                }
                else {
                    return [true, '', ''];
                }
            }});addSpansToDatesOnCalendar("calendarAccountDetailsAndRelationsView_4_container");
jQuery('#list-viewAccountDetailsAndRelationsView_5').yiiGridView({'ajaxUpdate':['list-viewAccountDetailsAndRelationsView_5'],'ajaxVar':'ajax','pagerClass':'pager horizontal','loadingClass':'loading','filterClass':'filters','tableClass':'items','selectableRows':0,'enableHistory':false,'updateSelector':'{page}, {sort}','filterSelector':'{filter}','pageVar':'Task_page','beforeAjaxUpdate':function(id, options) { $(this).makeSmallLoadingSpinner(true, "#" + id); },'afterAjaxUpdate':function(id, data) {
                        processAjaxSuccessError(id, data);
                    }});
$(document).on('click', '#list-viewAccountDetailsAndRelationsView_5 .task-kanban-detail-link', function()
                          {
                            var id = $(this).attr('id');
                            var idParts = id.split('-');
                            var taskId = parseInt(idParts[1]);
                            $.ajax(
                            {
                                'type' : 'GET',
                                'url'  : '/zurmo/app/index.php/tasks/default/modalDetails' + '?id=' + taskId,
                                'beforeSend' : function(){
                jQuery('#modalContainer').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                window.scrollTo(0, 0);
                jQuery('#modalContainer').dialog({
                    'title' : 'Collaborate On This Task',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : 'task-dialog',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer').parent().removeClass('openingModal');
                                                     $('#modalContainer').dialog('destroy');
                                                     $.fn.yiiGridView.update('list-viewAccountDetailsAndRelationsView_5');
                                                     }
                });
                return true;
            },
                                'update'     : '#modalContainer',
                                'success': function(html){jQuery('#modalContainer').html(html)}
                            });
                          }
                        );
$('body').on('click', '#CreateFromRelatedModalLinkActionElement--yt10', function(){jQuery.ajax({'beforeSend':function(){
                jQuery('#modalContainer').html('');
                $(this).makeLargeLoadingSpinner(true, '#modalContainer');
                window.scrollTo(0, 0);
                jQuery('#modalContainer').dialog({
                    'title' : 'Create Task',
                    'autoOpen' : true,
                    'modal' : true,
                    'position' : 'center top+25',
                    'dialogClass' : 'task-dialog',
                    'height' : 'auto',
                    'open': function( event, ui )  { jQuery('#modalContainer').parent().addClass('openingModal'); },
                    'close': function( event, ui ) { jQuery('#modalContainer').parent().removeClass('openingModal');
                                                     $('#modalContainer').dialog('destroy');
                                                     
                                                     }
                });
                return true;
            },'url':'/zurmo/app/index.php/tasks/default/modalCreateFromRelation?modalId=modalContainer&portletId=5&uniqueLayoutId=AccountDetailsAndRelationsView_5&sourceId=list-viewAccountDetailsAndRelationsView_5&relationAttributeName=Account&relationModelId=3&relationModuleId=accounts&redirectUrl=%2Fzurmo%2Fapp%2Findex.php%2Faccounts%2Fdefault%2Fdetails%3Fid%3D3%26stickyOffset%3D1','cache':false,'success':function(html){jQuery("#modalContainer").html(html)}});return false;});
jQuery('#list-viewAccountDetailsAndRelationsView_6').yiiGridView({'ajaxUpdate':['list-viewAccountDetailsAndRelationsView_6'],'ajaxVar':'ajax','pagerClass':'pager horizontal','loadingClass':'loading','filterClass':'filters','tableClass':'items','selectableRows':0,'enableHistory':false,'updateSelector':'{page}, {sort}','filterSelector':'{filter}','pageVar':'Contact_page','beforeAjaxUpdate':function(id, options) { $(this).makeSmallLoadingSpinner(true, "#" + id); },'afterAjaxUpdate':function(id, data) {
                        processAjaxSuccessError(id, data);
                    }});
jQuery('#list-viewAccountDetailsAndRelationsView_7').yiiGridView({'ajaxUpdate':['list-viewAccountDetailsAndRelationsView_7'],'ajaxVar':'ajax','pagerClass':'pager horizontal','loadingClass':'loading','filterClass':'filters','tableClass':'items','selectableRows':0,'enableHistory':false,'updateSelector':'{page}, {sort}','filterSelector':'{filter}','pageVar':'Opportunity_page','beforeAjaxUpdate':function(id, options) { $(this).makeSmallLoadingSpinner(true, "#" + id); },'afterAjaxUpdate':function(id, data) {
                        processAjaxSuccessError(id, data);
                    }});
juiPortlets.init('AccountDetailsAndRelationsView','accounts', '/zurmo/app/index.php/accounts/defaultPortlet/SaveLayout', 'YII_CSRF_TOKEN', 'd95bda53da3650780c9ccf3a9c745c6f900701af', '.juiportlet-columns-AccountDetailsAndRelationsView', '', '', 'This portlet will be removed, ok?');
});
/*]]>*/
</script>
</body></html>